<?php

namespace Models;

use System\library\mvc\model\Model;
use System\library\mvc\model\IModel;
use System\library\database\sql\Sql;

/**
 * <b>Class</b> :        SettingData<br>
 * <b>Fonction</b> :     Permet d'effectuer des reglages dans la bdd
 * <br>
 * @version              1.0
 * @author               Dread <dreadlokeur@gmail.com>
 * @license              Licence publique générale GNU http://www.gnu.org/licenses/gpl.html
 * @copyright            Copyright 2011 - MidichloriansPHP and contributors
 * @package              MidichloriansPHP
 * @subpackage           Models
 *
 * @see System\library\mvc\model\Model
 * @see System\library\mvc\model\IModel
 */
class SettingData extends Model implements IModel {

    private $_db;

    public function __construct($conf) {
        if (is_null($this->_db))
            $this->_db = $sql = Sql::factory($conf);
    }
    public function setCharset() {
        $req = 'SET NAMES UTF8';
        $this->_db->setQuery($req);
        $this->_db->execute();
    }

}

?>
